<template>
	<div class="box">
		<div class="box_other" v-if='this.$route.path!="/login"&&this.$route.path!="/about"&&this.$route.path!="/dandata"&&this.$route.matched.length!=0'>
			<Header></Header>
			<div class="body_box">
				<Leftmenu></Leftmenu>
				
				<router-view />
			</div>
		</div>
		
		<router-view v-if='this.$route.path=="/login"||this.$route.path=="/about"||this.$route.path=="/dandata"'/>
	</div>
  
  
</template>

<script>
import Header from "./components/header"; //header
import Leftmenu from "./components/leftmenu"; //左侧菜单
export default {
	data() {
		return {};
	},
	components: {
		Header,
		Leftmenu
	},
	computed: {
		
	},
	created() {
		let data = localStorage.getItem('userInfo')
		this.$store.commit('setUserInfo', JSON.parse(data))
	},
	mounted() {},
	methods: {
		
	}
};
</script>



<style lang="less" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
*{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-size: 0.2rem;
}

.box{
	height: 100vh;
	overflow: hidden;
	.box_other{
		height: 100%;
		display: flex;
		flex-direction: column;
		
		.body_box{
			flex: auto;
			display: flex;
			
			router-view{
				flex: auto;
			}
		}
	}
}

</style>
